<?php
/*
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
 * $Id: 2017-12-13 03:39:35 apple $
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'get';
if($_RQ['op']=='get'){
	$return['item']=core_setting('zhuce');
	$htmls=array(
		'type'=>'edit',
		'post'=>'post',
		'desc'=>'注册设置',
		'tabs'=>array(
			'0'=>array('op'=>'get','title'=>'系统注册设置'),
		),
		'edit'=>array(
			'0'=>array('type'=>'switch','title'=>'开启站点注册','name'=>'open' ),
			'1'=>array('type'=>'switch','title'=>'审核新用户','name'=>'newuser' ),
			'2'=>array('type'=>'switch','title'=>'启用注册验证码','name'=>'yzm' ),
		)
	);
	$return['htmls']=$htmls;
	exi($return);
}
if($_RQ['op']=='post'){
	$postdata=get_postdata();
	$setting=array('key'=>'zhuce','value'=>ijson_encode($postdata));
	pdo_insert('core_settings',$setting,true);
	exi('设置成功！');
}